<?php

class SearchController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
        $this->view->headMeta()->appendHttpEquiv('Content-Type','text-html;charset=UTF-8');
    }

    public function indexAction()
    {
        // action body
        $search=  $this->_request->getParam("search");
        $tinModel=new Model_Tin;
        $kqsearch=$tinModel->seachnew($search);
//        $timtin = new Model_Tin;
//        $search = $timtin->seachnew($this->_request->getParam("search"));
        $pa = Zend_Paginator::factory($kqsearch);
        $pa->setItemCountPerPage(6);
        $pa->setPageRange(3);
        $curent = $this->_request->getParam("page");
        $pa->setCurrentPageNumber($curent);
        $this->view->all = $pa;
    }
}



